package kr.hkit.powerjava.chapter17;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JTabbedPane;

public class Swing extends JFrame {
	private JPanel contentPane;
	private JTabbedPane tabbedPane;
	private ImageLabel ImagePanel;
	private CheckBoxLabel CheckPanel;
	private RadioLable RadioPanel;

	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					Swing frame = new Swing();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	public Swing() {
		initialize();
	}

	private void initialize() {
		setTitle("Chapter17");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 600, 400);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);

		tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		contentPane.add(tabbedPane, BorderLayout.CENTER);

		ImagePanel = new ImageLabel();
		tabbedPane.addTab("이미지 레이블", null, ImagePanel, null);

		CheckPanel = new CheckBoxLabel();
		tabbedPane.addTab("체크 박스", null, CheckPanel, null);

		RadioPanel = new RadioLable();
		tabbedPane.addTab("라디오 버튼 테스트", null, RadioPanel, null);
	}
}
